@echo off
chcp 65001

:: 定义基本信息
set "username=bairui_admin"
set "password=lianjingWeb123"
set "host=101.133.223.75"

:: 定义文件保存位置
set "position=E:\workspace\bairui.international\服务器导出的数据\"
set "tempDate=%date:~3,13%"
set "tempDate=%tempDate:/=-%"
set "tempTime=%time: =0%"
set "tempTime=%tempTime::=-%"
set "filename=bairui_international_%tempDate%_%tempTime%.sql"
echo %position%%filename%

::导出
mysqldump -u%username% -p%password% -h%host% --set-gtid-purged=off --default-character-set=utf8 bairui_international>"%position%%filename%"

pause